
package com.usersmodule.bean;

import java.io.Serializable;

import com.usersmodule.dao.TbUsersDAO;

public class TbRole implements Serializable{

    private int roleId;

    private String roleName;

    private int userId;
    private TbUsers tbUsers;

    private String roleMemo;

    private String createTime;

    public int getRoleId(){
        return roleId;
    }

    public void setRoleId(int roleId){
        this.roleId = roleId;
    }

    public String getRoleName(){
        return roleName;
    }

    public void setRoleName(String roleName){
        this.roleName = roleName;
    }

    public int getUserId(){
        return userId;
    }

    public void setUserId(int userId){
        this.userId = userId;
        this.tbUsers=new TbUsersDAO().getTbUsersByUserId(userId);
    }

    public String getRoleMemo(){
        return roleMemo;
    }

    public void setRoleMemo(String roleMemo){
        this.roleMemo = roleMemo;
    }

    public String getCreateTime(){
        return createTime;
    }

    public void setCreateTime(String createTime){
        this.createTime = createTime;
    }

    public TbUsers getTbUsers() {
		return tbUsers;
	}

	public void setTbUsers(TbUsers tbUsers) {
		this.tbUsers = tbUsers;
	}

	public TbRole(){
    }
    public TbRole(String roleName,int userId,String roleMemo){
        this.roleName = roleName;
        this.userId = userId;
        this.roleMemo = roleMemo;
    }
    public TbRole(int roleId,String roleName,int userId,String roleMemo){
        this.roleId = roleId;
        this.roleName = roleName;
        this.userId = userId;
        this.roleMemo = roleMemo;
    }
}

